public class Example22 {
    public static void main(String[] args) {
        int n = 100;
        System.out.println("水仙花数为:");
        do {
            int i = n%10;
            int j = (n/10)%10;
            int k = n/100;
            if ((i*i*i+j*j*j+k*k*k) == n){
                System.out.println(n+"");
            }
            n++;
        }while (n < 1000);
    }
}
